﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UsrMenuLeft.ascx.cs" Inherits="Baopx.BackEnd.Control.UsrMenuLeft" %>
<script type="text/javascript">
    $(document).ready(function () {
        $('p.parent').click(function () {
            $(this).parent().find('.menu-child').toggle();
        });
    });
</script>
<asp:Repeater ID='rptMenuParent' runat="server" 
    onitemdatabound="rptMenuParent_ItemDataBound">
    <HeaderTemplate>
        <ul class='menu-parent'>
    </HeaderTemplate>
    <ItemTemplate>
        <li class='parent'>
            <p class='parent'><%#Eval("Name") %></p>
            <ul class='menu-child' style='<%#Display(Eval("Id"))%>'>
                <asp:Repeater ID='rptMenuChild' runat="server">
                    <HeaderTemplate></HeaderTemplate>
                    <ItemTemplate>
                        <li class='child'>
                            <p class='child'><%#Eval("Name") %></p>
                            <ul>
                                <%#GetAllPage(Eval("Id"))%>
                            </ul>
                        </li>
                    </ItemTemplate>
                    <FooterTemplate></FooterTemplate>
                </asp:Repeater>
            </ul>
        </li>
    </ItemTemplate>
    <FooterTemplate>
        </ul>
    </FooterTemplate>
</asp:Repeater>